<!doctype html>
<!--[if gt IE 8]><!--> <html class="no-js" lang=""> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>教师端班级学生信息</title>
    <meta name="description" content="Ela Admin - HTML5 Admin Template">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.0/normalize.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lykmapipo/themify-icons@0.1.2/css/themify-icons.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixeden-stroke-7-icon@1.2.3/pe-icon-7-stroke/dist/pe-icon-7-stroke.min.css">
    <link rel="stylesheet" href="assets/css/cs-skin-elastic.css">
    <link rel="stylesheet" href="assets/css/lib/datatable/dataTables.bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/style.css">

    <!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> -->
	<script src="assets/js/vue.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.20.0/axios.min.js"></script>
</head>
<body>
    <!-- Left Panel -->

    <aside id="left-panel" class="left-panel">
       <nav class="navbar navbar-expand-sm navbar-default">
       
               <div id="main-menu" class="main-menu collapse navbar-collapse">
                   <ul class="nav navbar-nav">
                       
                       <li class="menu-title">菜单</li><!-- /.menu-title -->
                       <li>
                           <a href="tea-dataOfClass.html"> <i class="menu-icon fa fa-users"></i>班级 </a>
                       </li>
       				<li>
       				    <a href="tea-dataOfStudent.html"> <i class="menu-icon fa fa-file-word-o"></i>班级学生信息 </a>
       				</li>
					<li>
					    <a href="tea-updateHomework.html"> <i class="menu-icon fa fa-file-word-o"></i>插入新的一轮作业 </a>
					</li>
                       <li class="menu-title">退出</li><!-- /.menu-title -->
                       <li>
                           <a href="loginteacher.html"> <i class="menu-icon fa fa-user-o"></i>退出登录 </a>
                       </li>
                   </ul>
               </div><!-- /.navbar-collapse -->
           </nav>
        </aside><!-- /#left-panel -->

    <!-- Left Panel -->

    <!-- Right Panel -->

    <div id="right-panel" class="right-panel">

        <!-- Header-->
        <header id="header" class="header">
            <div class="top-left">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#"><i class="menu-icon fa fa-user-circle fa-2x"></i></a>
					
                </div>
            </div>
          
        </header><!-- /header -->
        <!-- Header-->

        <div class="breadcrumbs">
            <div class="breadcrumbs-inner">
                <div class="row m-0">
                    
                    
                </div>
            </div>
        </div>

        <div class="content">
        	<div class="animated fadeIn">
        		<div class="row" id="app">
        
        			<div class="col-md-12">
        				<div class="card">
        					<div class="card-header"><strong>插入一轮作业</strong><small></small></div>
        					<div class="card-body card-block">
        						<div class="form-group"><label for="company" class=" form-control-label">本轮作业信息</label>
        						<input type="text" id="note"
        							 placeholder="请输入本轮作业信息.." class="form-control">
        						</div>
        				</div>
        			</div>
        			<div class="card-body" align="center">
        			
        				<button type="button" class="btn btn-success" onclick="ModifyAccount()">插入</button>
        				
        			
        			</div>
        
        		</div>
        	</div><!-- .animated -->
        </div><!-- .content -->


        <!-- /#right-panel -->

    <!-- Right Panel -->

    <!-- Scripts -->
	<!--
    <script src="https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.4/dist/umd/popper.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery-match-height@0.7.2/dist/jquery.matchHeight.min.js"></script>
    <script src="assets/js/main.js"></script>


    
    <script src="assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
    <script src="assets/js/lib/data-table/dataTables.buttons.min.js"></script>
    <script src="assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
    
    
    <script src="assets/js/lib/data-table/buttons.html5.min.js"></script>
    <script src="assets/js/lib/data-table/buttons.print.min.js"></script>
    <script src="assets/js/lib/data-table/buttons.colVis.min.js"></script>
    <script src="assets/js/init/datatables-init.js"></script>-->


<script type="text/javascript">
				function ModifyAccount(){
					var note = document.getElementById('note').value;
					var classid = window.localStorage.getItem('TselectClass');//获取登录后的教师Username
						axios.get(
								'http://172.81.214.138:8000/task_new?classid='+classid+'&tasknote='+note)
							//成功返回
							.then(response => {
								console.log(response);
								if(response.data.state==1){
									alert('插入成功');
								}
								else{
									alert('插入失败！');
								}
							})
							//失败返回
							.catch(error => {
								console.log(error);
							})
				}
</script>

</body>
</html>
